#include <unistd.h>
#include <iostream>
#include <sys/types.h>
#include <sys/wait.h>
#include <errno.h>
#include "Config.h"

class DynamoWrapper
{
public:
    void run(const Config& cfg, const std::string& sym_file)
    {
        const std::string cmd = cfg.getDynamoBinPath() + cfg.getDynamoOthers()
                                + cfg.getDynamoMaxEvts() + cfg.getDynamoDeltaT() + cfg.getDynamoViewer()
                                + " --uncompressed --out-data-file /dev/null --out-config-file " + sym_file + " "
                                + sym_file;

        std::cout << "Running: " << cmd << "\n";
        system(cmd.c_str());
    }

    void runxyz(const Config& cfg, const std::string& sym_file)
    {
        const std::string cmd = cfg.getDynamoBinPath()
                                + " -c0 -LTinkerXYZ --out-data-file /dev/null --out-config-file /dev/null "
                                + sym_file;

        std::cout << "Running: " << cmd << "\n";
        system(cmd.c_str());
    }

};

